home *** CD-ROM | disk | FTP | other *** search
- package sun.net;
-
- import java.io.IOException;
- import java.net.DatagramPacket;
- import java.net.DatagramSocket;
- import java.net.InetAddress;
- import java.net.SocketException;
-
- public final class MulticastSocket extends DatagramSocket {
- public MulticastSocket() throws SocketException {
- }
-
- public MulticastSocket(int var1) throws SocketException {
- super(var1);
- }
-
- public void joinGroup(InetAddress var1) throws SocketException {
- this.multicastJoin(var1);
- }
-
- public void leaveGroup(InetAddress var1) throws SocketException {
- this.multicastLeave(var1);
- }
-
- public synchronized void send(DatagramPacket var1, byte var2) throws IOException, SocketException {
- SecurityManager var3 = System.getSecurityManager();
- if (var3 != null) {
- var3.checkConnect(var1.getAddress().getHostAddress(), var1.getPort());
- }
-
- this.setTTL(var2);
- ((DatagramSocket)this).send(var1);
- }
-
- private native void setTTL(byte var1);
-
- private native void multicastJoin(InetAddress var1);
-
- private native void multicastLeave(InetAddress var1);
-
- static {
- System.loadLibrary("net");
- }
- }
-